library(haven)
library(ggplot2)
library(tidyr)
#library(cshapes)
library(dplyr)
library(sqldf)
library(readxl)
library(scales)

setwd("C:/Users/jonves/Dropbox/Papers/SSP-Instability-Opinion/replication_data/")

#Load GDP projections based on replication data from Hegre et al. ERL 2016 (original file: PredictionSSP_1.dta)
erl <- read_dta("data/Fig1B.dta")
erl$lgdpcap <- log(erl$GDPcapSSP3)
erl$gwno <- factor(erl$gwno)

ggplot(erl, aes(x = year, y = lgdpcap, group = gwno, color = gwno)) + 
  geom_line() + 
  theme(legend.position="none")